package com.bsoft.gol.hcs.enumcase;

/**
 * @author tongtp
 * @version v0.1
 * @package enumcase
 * @className FactorFlagEnum
 * @description 因素类型枚举
 * @create 2022-05-27 14:01
 **/
public enum FactorFlagEnum {

	START((byte) 1, "开始"),
	STOP((byte) 2, "停止");

	private final Byte type;

	private final String name;

	FactorFlagEnum(Byte type, String name) {
		this.type = type;
		this.name = name;
	}

	public static FactorFlagEnum getEnumByKey(Byte type) {
		for (FactorFlagEnum temp : FactorFlagEnum.values()) {
			if (temp.getType().equals(type)) {
				return temp;
			}
		}
		return null;
	}

	public Byte getType() {
		return type;
	}

	public String getName() {
		return name;
	}
}
